<template>
	<view class="user" :class="AppStyle">
		<view class="info" style="margin-top: 20upx;">
			<view class="info-title">
				{{newsDetail.newsTitle}}
			</view>

			<view class="info-tyle">
				<text class="text-gray" >{{newsDetail.newsResourceName}}</text>
				<!-- <text class="text-gray left-margin" >
					<i class="zi zi_eye"></i> 
					<text class="left-margin-10">1.3W</text>
				</text> -->
				<text class="text-gray left-margin" @tap="thumbsNews">
					<i class="zi zi_digg" zico="点赞" v-if="newsDetail.isThumbs" style="color: red;"></i>
					<i class="zi zi_digg" zico="点赞" v-else></i>
					<text class="left-margin-10">1.3W</text>
				</text>
				<text class="text-gray left-margin">{{newsDetail.publishDay}}</text>
			</view>
		</view>
		<view class="info-content">
			<mp-html :content="newsDetail.newsContent" 
			:selectable="true" :show-img-menu="true" 
			:scroll-table="true" :markdown="true" 
			:lazy-load="false"/>
		</view>
		
		<view class="info-content">
			<paiHangBang :showMore='false' url='' 
			:topList = 'newsDetail.topList'  title='相关投票'
			:showNum='true'></paiHangBang>
		</view> 
		<view class="info-content" v-if="commentData" >
			<hb-comment ref="hbComment" :deleteTip="'确认删除？'" :cmData="commentData" :replyType="1"></hb-comment>
		</view>
	</view>
</template>

<script>
	import paiHangBang from '@/components/paihang/paiHangBang.vue'
	
	export default {
		components: {
			paiHangBang
		},
		data() {
			return {
				AppStyle: '',
				newsDetail: {
					id: 12,
					newsTitle: '朝鲜大规模核武器大量爆炸',
					publishDay: '2023-04-03 12:23',
					newsResourceName: '环球网',
					isThumbs: true,
					newsContent: '<p>我们都知道，学校是教书育人，为祖国培养人才的地方，而作为学校的直管单位，教育局更是肩负着重要的责任和使命，可谁能想到，浙江一位教育局的局长不仅不以身作则，反而还做出了一些毫无道德底线的事情。2023年2月9日，一则“浙江一局长被曝中午陪情人晚上KTV”登上了热搜的榜首，引发了广泛的关注。</p><figure class="image"><img src="https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2023%2F0209%2Fd12b7444j00rpsilp0017c000hs00ccm.jpg&amp;thumbnail=660x2147483647&amp;quality=80&amp;type=jpg"></figure><p>据爆料：涉事的局长为浙江余姚的教育局长王胜战，他一边拿着体制内的工资，一边逍遥快活，“早上单位醒酒，中午陪情人，晚上KTV”，不得不说，这位局长不仅生活逍遥，精力也是够充沛的，换成一般人，恐怕早就虚脱了；另外，网友们在聊天中也曝光了大量细节，简直颠覆了我们的认知。</p><figure class="image"><img src="https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2023%2F0209%2F57414cfdj00rpsilq003zc000hs00bvm.jpg&amp;thumbnail=660x2147483647&amp;quality=80&amp;type=jpg"></figure><p>好在，当地纪委也是反应迅速，据当地的通报：余姚市教育局党委书记、局长王胜战涉嫌严重违纪违法，正在接受当地市委监委的审查和监察调查。</p>',
					topList: [{"parent":0,"title":"求大佬做一个云端拦截码","type":"post","isrecommend":0,"istop":0,"markdown":1,"modified":1653052140,"text":"求大佬做一个云端拦截码学习","tag":[],"commentsNum":14,"slug":"54","views":905637,"likes":7213,"orderKey":0,"allowFeed":"1","isswiper":0,"images":[],"created":1653049951,"authorInfo":{"name":"就是那么牛","avatar":"https://cdn.helingqi.com/wavatar/a1880ef80ca33325ef8ec46f7dd19943","experience":0,"isvip":0},"allowComment":"1","authorId":44,"allowPing":"1","fields":[],"category":[{"orderKey":7,"parent":0,"isrecommend":0,"count":0,"name":"交易板块","description":"","mid":11,"type":"category","slug":"交易板块"}],"cid":54,"status":"publish"},{"parent":0,"title":"QR Cloud机器人框架开发思路解析","type":"post","isrecommend":0,"istop":0,"markdown":1,"modified":1673497634,"text":"项目名称:QrCloud面向对象:QQ机器人使用用户项目用途:为各QQ机器人用户提供更快更高效的后台架构分析:**·优点**1.总体分为app客户端由lua语言和java语言编写，编译器为luagox+pro+php后端云，在减轻服务器负载的情况下将部分文件采用**base64加密,md5加密,自制加密算法等**存储在本地空间，使用户更快更高效的调用2.首页对接音乐系统，编写code的过程不会特别无聊3.用户账号，密码采用mysql存储，使用md5加密保护数据4.vip系统采用php后端mysql存储数据，异地备份保证数据不会丢失5.笔记功能采用webdav云备份，既减少了服务器空间占用，又保护了用户数据存储**·缺点**1.lua语言本身加密性低，易反编译造成安全问题2.编辑器改编自androluax+，为java文件，文件大于1mb时运行卡顿","tag":[],"commentsNum":11,"slug":"203","views":711165,"likes":4566,"orderKey":0,"allowFeed":"1","isswiper":1,"images":["http://bbs.eyunapps.com/usr/uploads/2022/08/3152531146.png"],"created":1661237820,"authorInfo":{"name":"若客","avatar":"https://q1.qlogo.cn/g?b=qq&nk=1346881234&s=640","experience":0,"customize":"官方技术博主","isvip":0},"allowComment":"1","authorId":65,"allowPing":"1","fields":[],"category":[{"orderKey":2,"parent":0,"isrecommend":0,"count":0,"name":"精品文章","description":"好文章","mid":3,"type":"category","slug":"精品文章"},{"orderKey":6,"parent":0,"isrecommend":0,"count":6,"name":"天神项目组","description":"","mid":10,"type":"category","slug":"天神项目组"}],"cid":203,"status":"publish"},{"parent":0,"title":"同学录系统开发思路","type":"post","isrecommend":1,"istop":0,"markdown":1,"modified":1673497643,"text":"项目名称：102同学录面相对象：同学项目用途：用于同学间记录信息架构分析：1.逻辑方面：主要提供系统可支持的功能需求，即该项目提供给同学的功能服务方面。2.开发方面:使用AndroidStudio编写。主要侧重于项目本地模块化，便于开发者管理。3.通讯方面：使用数据库进行存储数据，以及数据管理，数据传输等。保证客户端与数据库数据的统一性，完整性以及传输速率。由开发者进行管理。设计思路：1.客户端简约化：简约传输内容，增加传输效率。优化用户体验。优化页面，使页面从视觉上表现的更为美观。2.数据加密化：数据加密话化可保证每位同学的私人信息不泄露，最大程度的保证每位同学的书数据安全。3.功能多样化：实习同学录管理的操作功能，如录入，查找，删除，排序等。","tag":[],"commentsNum":8,"slug":"200","views":711297,"likes":4572,"orderKey":0,"allowFeed":"1","isswiper":0,"images":["https://eyunapp-1300649801.cos.ap-nanjing.myqcloud.com//img//2022/8/27/1a58e325-fc83-4a00-89c6-21939652b504.jpg"],"created":1661235892,"authorInfo":{"name":"云神","avatar":"https://eyunapp-1300649801.cos.ap-nanjing.myqcloud.com//img//2022/8/23/42036095-745b-4c7f-a93d-407989819885.png","experience":0,"customize":"官方技术博主","isvip":0},"allowComment":"1","authorId":9,"allowPing":"1","fields":[],"category":[{"orderKey":2,"parent":0,"isrecommend":0,"count":0,"name":"精品文章","description":"好文章","mid":3,"type":"category","slug":"精品文章"},{"orderKey":6,"parent":0,"isrecommend":0,"count":6,"name":"天神项目组","description":"","mid":10,"type":"category","slug":"天神项目组"}],"cid":200,"status":"publish"},{"parent":0,"title":"2022年二批处分名单","type":"post","isrecommend":0,"istop":0,"markdown":1,"modified":1660190000,"text":"落尘、狗子、殇久、长安处分。陌城、零度警告","tag":[],"commentsNum":6,"slug":"192","views":798970,"likes":5165,"orderKey":0,"allowFeed":"1","isswiper":0,"images":[],"created":1660190000,"authorInfo":{"name":"辰然","avatar":"https://eyunapp-1300649801.cos.ap-nanjing.myqcloud.com//img//2022/8/9/934daf86-ee5c-475c-81f9-ae8b26791f1a.png","experience":5,"customize":"神阁版主","isvip":2},"allowComment":"1","authorId":1,"allowPing":"1","fields":[],"category":[{"orderKey":6,"parent":0,"isrecommend":0,"count":6,"name":"天神项目组","description":"","mid":10,"type":"category","slug":"天神项目组"}],"cid":192,"status":"publish"},{"parent":0,"title":"天神项目组-新年寄语","type":"post","isrecommend":0,"istop":1,"markdown":1,"modified":1673666219,"text":"过去的一年，也是沉寂的一年。无声但心不散，恍惚间，项目组成立已三年，这三年陪伴着很多成员度过了他们人生中重要的转折点。我们是年轻的项目组，是自由的项目组，但绝不是一个有实力的项目组。我们缺乏有创新能力、执着学习进取的人才，缺乏有效的管理机制，单靠我们不变的心是根本发展不了，进步不了的。于是乎，在新的一年里，我真诚希望项目组在职成员，懂得学习，善于学习，只有学习才能武装自己，只有学习才能改变自己。我们看惯了太多大佬的存在，但你们不知道的是你们一样可以成为大佬，我在你们身上看到了潜力，于是我满怀信心写下这篇文章。学习吧，学习一门语言，学精一门语言；学一门技术，学透一门技术。我曾经什么都不会，我崇拜着他们，但我绝不只是崇拜，我模仿，学习，创新，最后成为他们，现在超越他们，唯一的秘诀那就是学习。我之前不会PHP我现在会了，我之前不会H5，JQ，Vue，uniapp但我现在会了，不仅会了，我还拿得出","tag":[{"orderKey":0,"parent":0,"isrecommend":0,"count":1,"name":"新年ji'yu","mid":24,"type":"tag","slug":"新年ji-yu"}],"commentsNum":5,"slug":"256","views":54,"likes":11,"orderKey":0,"allowFeed":"1","isswiper":0,"images":[],"created":1673583060,"authorInfo":{"name":"辰然","avatar":"https://eyunapp-1300649801.cos.ap-nanjing.myqcloud.com//img//2022/8/9/934daf86-ee5c-475c-81f9-ae8b26791f1a.png","experience":5,"customize":"神阁版主","isvip":2},"allowComment":"1","authorId":1,"allowPing":"1","fields":[],"category":[{"orderKey":6,"parent":0,"isrecommend":0,"count":6,"name":"天神项目组","description":"","mid":10,"type":"category","slug":"天神项目组"}],"cid":256,"status":"publish"}],
				
				},
				commentData: {
					"totalNum": 193,
					"comment": [{
							"id": 1, // 唯一主键
							"owner": false, // 是否是拥有者，为true则可以删除，管理员全部为true
							"hasLike": false, // 是否点赞
							"likeNum": 2, // 点赞数量
							"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797755537/0", // 评论者头像地址
							"nickName": "超长昵称超长...", // 评论者昵称，昵称过长请在后端截断
							"content": "啦啦啦啦", // 评论内容
							"parentId": null, // 所属评论的唯一主键
							"createTime": "2021-07-02 16:32:07" ,// 创建时间,
							position: '广东省',
							replyCount: 12,
							hideChildren: true,
							children: [
								{
									"id": 11, // 唯一主键
									"owner": false, // 是否是拥有者，为true则可以删除，管理员全部为true
									"hasLike": false, // 是否点赞
									"likeNum": 0, // 点赞数量
									"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797755537/0", // 评论者头像地址
									"nickName": "超长昵称超长...", // 评论者昵称，昵称过长请在后端截断
									"content": "我是子集评论的第二个", // 评论内容
									"replyName": "张三我最牛", // 被回复的用户昵称
									"createTime": "2021-07-02 16:32:07" ,// 创建时间,
									position: '河北',
								},{
									"id": 10, // 唯一主键
									"owner": false, // 是否是拥有者，为true则可以删除，管理员全部为true
									"hasLike": false, // 是否点赞
									"likeNum": 2, // 点赞数量
									"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797755537/0", // 评论者头像地址
									"nickName": "张三我最牛", // 评论者昵称，昵称过长请在后端截断
									"content": "我是子集评论的第一个", // 评论内容
									"createTime": "2021-07-02 16:32:07" ,// 创建时间,
									position: '山东',
								},
							]
						},
						{
							"id": 2,
							"owner": false,
							"hasLike": false,
							"likeNum": 2,
							"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797761970/0",
							"nickName": "寂寞无敌",
							"content": "我是评论的评论",
							"parentId": 1,
							"createTime": "2021-07-02 17:05:50",
							position: '山东',
							replyCount: 0,
							hideChildren: true,
						},
						{
							"id": 4,
							"owner": true,
							"hasLike": true,
							"likeNum": 1,
							"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797763270/0",
							"nickName": "name111",
							"content": "评论啦啦啦啦啦啦啦啦啦啦",
							"parentId": null,
							"createTime": "2021-07-13 09:37:50",
							position: '北京',
							replyCount: 0,
							hideChildren: false,
						},
						{
							"id": 5,
							"owner": false,
							"hasLike": false,
							"likeNum": 0,
							"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797755537/0",
							"nickName": "超长昵称超长...",
							"content": "超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论超长评论",
							"parentId": null,
							"createTime": "2021-07-13 16:04:35",
							position: '山东',
							replyCount: 0,
							hideChildren: false,
						},
						{
							"id": 13,
							"owner": false,
							"hasLike": false,
							"likeNum": 0,
							"avatarUrl": "https://inews.gtimg.com/newsapp_ls/0/13797755537/0",
							"nickName": "超长昵称超长...",
							"content": "@寂寞无敌 你怕不是个大聪明",
							"parentId": 1,
							"createTime": "2021-07-14 11:01:23",
							position: '山东',
							replyCount: 0,
							hideChildren: false,
						}
					]
				},
				
			}
		},
		methods: {
			thumbsNews() {
				console.info('点赞或者取消点赞')
				this.newsDetail.isThumbs = !this.newsDetail.isThumbs
			}
		}
	}
</script>

<style lang="scss" scoped>
	.left-margin {
		margin-left: 35rpx;
	}
	.left-margin-10 {
		margin-left: 8rpx;
	}
	
</style>
